package com.jk.hearthstone.card;

import com.jk.hearthstone.core.BaseController;
import com.jk.hearthstone.core.Controller;
import com.jk.hearthstone.core.ControllerAdapter;
import com.jk.hearthstone.enumeration.CardOwner;

/**
 * 所有卡片的基类
 * @author jk
 */
public abstract class BaseCard implements Cloneable {
    public Integer cost;
    public CardOwner cardOwner;
    public Boolean isModified = false;

    protected ControllerAdapter myController;

    public BaseController getMyController(){
        if(myController == null){
            myController = new ControllerAdapter(){};
        }
        return myController;
    }

    public void initMyController(){
        myController = null;
    }

    @Override
    public Object clone() throws CloneNotSupportedException {
        return super.clone();
    }
}
